<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
<div id="app">大家好,我是<h1>{{text}}</h1></div>
<!-- 1:引包 -->
<script type="text/javascript" src="../../node_modules/vue/dist/vue.js"></script>
<script type="text/javascript">
  new Vue({
    el: "#app",
    template: `<div>
              <span v-text="text"></span>
              <span v-html="tHtml"></span>
              <span v-if="num==1">测试v-if</span>
              <span v-else-if="num==2">测试v-else-if</span>
              <span v-else>测试v-else</span>
              </div>`,
    data: function () {
      return {
        text: 'Vue.js',
        tHtml: '<h2>v-html</h2>',
        num: 3
      }
    }
  })
</script>

</body>
</html>
